QT       += core gui
QT       += sql
QT       += charts
QT       += network

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++11

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += SQLITE_HAS_CODEC

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    FundData/funddata.cpp \
    Spider/funddbspider.cpp \
    Spider/tiantianspider.cpp \
    downloader/databasedownloader.cpp \
    log/qlog.cpp \
    sql/sql_common.cpp \
    sql/sql_fund.cpp \
    sql/sql_fundlist.cpp \
    sql/sqlcipher.cpp \
    time/timetool.cpp \
    userInterfaces/fund/uifunddetail.cpp \
    userInterfaces/fund/uifundlist.cpp \
    userInterfaces/main/main.cpp \
    userInterfaces/main/mainwindow.cpp \
    userInterfaces/userlabel.cpp

HEADERS += \
    FundData/funddata.h \
    Spider/funddbspider.h \
    Spider/tiantianspider.h \
    downloader/databasedownloader.h \
    log/qlog.h \
    sql/sql_common.h \
    sql/sql_fund.h \
    sql/sql_fundlist.h \
    sql/sqlcipher.h \
    time/timetool.h \
    userInterfaces/fund/uifunddetail.h \
    userInterfaces/fund/uifundlist.h \
    userInterfaces/main/mainwindow.h \
    userInterfaces/userlabel.h

FORMS += \
    userInterfaces/fund/uifunddetail.ui \
    userInterfaces/fund/uifundlist.ui \
    userInterfaces/main/mainwindow.ui

TRANSLATIONS += \
    language/zh_CN.ts \
    language/en_US.ts

INCLUDEPATH += \
    FundData \
    sql\
    userInterfaces/main \
    userInterfaces/fund \
    userInterfaces \
    Spider \
    downloader \
    log \
    time


# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target


DISTFILES += \
    README.md


CONFIG += exceptions

RC_ICONS = $$PWD/res/logo.ico

##Python part
#win32: LIBS += -L$$PWD/../../python39/libs/ -lpython39

#INCLUDEPATH += $$PWD/../../python39/include
#DEPENDPATH += $$PWD/../../python39/include

# OpenSSL part
win32: LIBS += -L$$PWD/plugins/openssl/win32/ -llibcrypto-1_1
win32: LIBS += -L$$PWD/plugins/openssl/win32/ -llibssl-1_1


## Openssl part
#win32: LIBS += -L$$PWD/plugins/openssl/win32/lib/ -llibcrypto.dll
#win32: LIBS += -L$$PWD/plugins/openssl/win32/lib/ -llibssl.dll

#INCLUDEPATH += $$PWD/plugins/openssl/win32/include/openssl
#DEPENDPATH += $$PWD/plugins/openssl/win32/include/openssl

#win32:!win32-g++: PRE_TARGETDEPS += $$PWD/plugins/openssl/win32/lib/libcrypto.lib
#else:win32-g++: PRE_TARGETDEPS += $$PWD/plugins/openssl/win32/lib/libcrypto.dll.a
#win32:!win32-g++: PRE_TARGETDEPS += $$PWD/plugins/openssl/win32/lib/libssl.lib
#else:win32-g++: PRE_TARGETDEPS += $$PWD/plugins/openssl/win32/lib/libssl.dll.a

# SqlCipher part
#win32: LIBS += -L$$PWD/plugins/sqldrivers/win32/ -llibsqlcipher-0

win32: LIBS += -L$$PWD/plugins/sqldrivers/win32/lib/ -lsqlcipher

INCLUDEPATH += $$PWD/plugins/sqldrivers/win32/include/sqlcipher
DEPENDPATH += $$PWD/plugins/sqldrivers/win32/include/sqlcipher

#win32:!win32-g++: PRE_TARGETDEPS += $$PWD/plugins/sqldrivers/win32/lib/sqlcipher.lib
#else:win32-g++: PRE_TARGETDEPS += $$PWD/plugins/sqldrivers/win32/lib/libsqlcipher.a


